package com.rundatop.core.entity;

public class DataEntity {
	public String getStatusCode() {
		return statusCode;
	}

	public void setStatusCode(String statusCode) {
		this.statusCode = statusCode;
	}

	public Boolean getSuccess() {
		return success;
	}

	public void setSuccess(Boolean success) {
		this.success = success;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	private String statusCode;
	private Boolean success;
	private Object data;
	private String message;
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	

	public DataEntity(String statusCode, boolean success, String message) {
		this.statusCode = statusCode;
		this.success = success;
		this.message=message;
	}

	public DataEntity(Object data) {
		this.statusCode = "200";
		this.success = true;
		this.data = data;
	}

	public DataEntity(boolean success) {
		this.statusCode = "200";
		this.success = success;
		this.data = null;
	}

	public DataEntity(String statusCode, boolean success) {
		this.statusCode = statusCode;
		this.success = success;
		this.data = null;
	}

	public static DataEntity getInstance(Object data) {
		return new DataEntity(data);
	}

	public static DataEntity getInstance(boolean success) {
		return new DataEntity(success);
	}

	public static DataEntity getInstance(String statusCode, boolean success) {
		return new DataEntity(statusCode, success);
	}

	public static DataEntity getInstance(String statusCode, boolean success,
			String message) {
		return new DataEntity(statusCode, success, message);
	}
}
